const path = require('path');

module.exports = {
  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'scss',
      patterns: [ // 自动引入scss文件
          path.resolve(__dirname, 'src/assets/common.scss'),
      ],
      // 配置px2rpm postcss-plugin-px2rem lib-flexible
    }
  },
  css: {
    loaderOptions: {
      postcss: {
        plugins: [
            require('postcss-plugin-px2rem')({
              rootValue: 37.5, // 设计稿的大小 375 ，375 =》 10rem
              // exclude: /node_module/
            })
        ]
      }
    }
  }
}
